import torchvision
from torch.utils.tensorboard import SummaryWriter

dataSet_transform = torchvision.transforms.Compose([
    torchvision.transforms.ToTensor()
])


# train_set = torchvision.datasets.CIFAR10("../../data/CIFAR10DataSet",train=True,download=True)
# test_set = torchvision.datasets.CIFAR10("../../data/CIFAR10DataSet",train=False,download=True)
train_set = torchvision.datasets.CIFAR10("../../dataSet/CIFAR10DataSet",train=True,transform=dataSet_transform,download=True)
test_set = torchvision.datasets.CIFAR10("../../dataSet/CIFAR10DataSet",train=False,transform=dataSet_transform,download=True)

# print(test_set[0])
# print(test_set.classes)
#
# img , target = test_set[0]
# print(img)
# print(target)
# img.show()

print(test_set[0])


writer = SummaryWriter("../logs")

for i in range(10):
    img , target =test_set[i]
    writer.add_image("test_set",img,i)

writer.close()
